const CollapsedReducer = (
  preState = {
    isCollapsed: true,
  },
  action
) => {
  switch (action.type) {
    case 'change-collapsed':
      let newState = { ...preState }
      newState.isCollapsed = !newState.isCollapsed
      return newState
    default:
      return preState
  }
}

export default CollapsedReducer
